package com.jcl.tree.controller;

import com.jcl.tree.po.TreeNode;
import com.jcl.tree.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2021/2/5 0:33
 */
@RestController
@RequestMapping("tree")
public class TreeController
{
    @Autowired
    private TreeService treeService;

    @GetMapping("/")
    public List<TreeNode> getList()
    {
        return treeService.getList();
    }
}
